import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 28779
 * Date: 2023-03-25
 * Time: 15:03
 */
class Animal{
    protected String name;

    public Animal(String name) {
        this.name = name;
    }

    public void eat(){
        System.out.println(this.name + " 汪汪");
    }
}
class Dog extends Animal{
    public int age;

    public Dog(String name, int age) {
        super(name);
        this.age = age;
    }
    public static void testFunc(Animal animal){
        animal.eat();
    }

    @Override
    public void eat(){

        System.out.println(this.name + " 正在旺旺");
    }
}

class Cat extends Animal{
    public Cat(String name) {
        super(name);
    }
    public void eat(){
        System.out.println();
    }
    public static void testFunc(Animal animal){
        animal.eat();
    }
}

/*public static void testFunc(Animal animal){
    animal.eat();
}*/

public class Test {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入：");
        String name = scanner.nextLine();
        double age = scanner.nextDouble();
        System.out.println(name);
        //Dog dog = new Dog("jianwei",18);
        //testFunc(dog);
        //dog.eat();
    }
}
